package org.jsola.contract.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.contract.example.AppendixExample.E_CONTRACT_ID;
import static org.jsola.contract.example.AppendixExample.E_CURRENT_PAGE;
import static org.jsola.contract.example.AppendixExample.E_NAME;
import static org.jsola.contract.example.AppendixExample.E_PASSWORD;
import static org.jsola.contract.example.AppendixExample.E_PATH;
import static org.jsola.contract.example.AppendixExample.M_CONTRACT_ID_NOT_NULL;
import static org.jsola.contract.example.AppendixExample.M_CURRENT_PAGE_NOT_NULL;
import static org.jsola.contract.example.AppendixExample.M_NAME_MAX;
import static org.jsola.contract.example.AppendixExample.M_PASSWORD_MAX;
import static org.jsola.contract.example.AppendixExample.M_PATH_MAX;
import static org.jsola.contract.example.AppendixExample.N_CONTRACT_ID;
import static org.jsola.contract.example.AppendixExample.N_CURRENT_PAGE;
import static org.jsola.contract.example.AppendixExample.N_NAME;
import static org.jsola.contract.example.AppendixExample.N_PASSWORD;
import static org.jsola.contract.example.AppendixExample.N_PATH;
import static org.jsola.core.example.BaseExample.E_ID;
import static org.jsola.core.example.BaseExample.M_ID_NOT_NULL;
import static org.jsola.core.example.BaseExample.N_ID;

/**
 * 合同文件
 *
 * @author JanusMix
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "修改【合同文件】的参数")
@Data
public class AppendixUpdateDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ID, example = E_ID, required = true)
    @NotNull(message = M_ID_NOT_NULL)
    private Long id;

    @ApiModelProperty(notes = N_NAME, example = E_NAME)
    @Length(max = 255, message = M_NAME_MAX)
    private String name;

    @ApiModelProperty(notes = N_CONTRACT_ID, example = E_CONTRACT_ID, required = true)
    @NotNull(message = M_CONTRACT_ID_NOT_NULL)
    private Long contractId;

    @ApiModelProperty(notes = N_CURRENT_PAGE, example = E_CURRENT_PAGE, required = true)
    @NotNull(message = M_CURRENT_PAGE_NOT_NULL)
    private Integer currentPage;

    @ApiModelProperty(notes = N_PATH, example = E_PATH)
    @Length(max = 3000, message = M_PATH_MAX)
    private String path;

    @ApiModelProperty(notes = N_PASSWORD, example = E_PASSWORD)
    @Length(max = 255, message = M_PASSWORD_MAX)
    private String password;


}

